#include "SimpleCollisionTest.h"
#include "Game.h"

void SimpleCollisionTest::Update(GameObjectsMap* A)
{
	GameObjectsMap::iterator it;


	for(it = A->begin(); it != A->end(); ++it)
	{
		GameObjectsMap::iterator jt = it;
		++jt;
		for( ; jt != A->end(); ++jt)
		{
			GameObject* go1 = it->second;
			GameObject* go2 = jt->second;
			if (TheyCollide(go1, go2))
			{
				TheGame::Instance()->HandleCollision(go1, go2);
			}
		}
	}
}